/*
 * @Descripttion:
 * @version:
 * @Author: zhangjian
 * @Date: 2022-05-25 11:07:49
 * @LastEditors: zhangjian
 * @LastEditTime: 2022-06-22 17:41:07
 */
import http from '@/utils/httpRequest'
export default {

/** 获取文章列表  **/
  articleListApi (param) {
    return http.get(http.adornUrl('/admin/bbs/article/list'), { params: param })
  },
/** 保存文章  **/
  saveArticle (param) {
    return http.post(http.adornUrl('/admin/bbs/article/save'), param)
  },
/** 课程分类列表（下拉）  **/
  courseClassApi (param) {
    return http.get(http.adornUrl('/admin/article/course/classify/select'), param)
  },
/** 文章详情  **/
  showArticle (param) {
    return http.get(http.adornUrl(`/admin/bbs/article/info/${param}`))
  },
/** 修改文章  **/
  updateArticle (param) {
    return http.put(http.adornUrl('/admin/bbs/article/update'), param)
  },
/** 文章上下架  **/
  articleAdded (param) {
    return http.post(http.adornUrl('/admin/bbs/article/added'), param)
  },
/** 设置或取消推荐文章  **/
  articleRecommend (param) {
    return http.post(http.adornUrl('/admin/bbs/article/set-recommend'), param)
  },
/** 设置或取消推荐文章  **/
  articleDelete (param) {
    return http.delete(http.adornUrl(`/admin/bbs/article/delete/${param}`))
  },
/** 宣传素材/获取分页数据  **/
  materialPage (param) {
    return http.get(http.adornUrl(`/admin/material/page`), { params: param })
  },
/** 宣传素材/获取分页数据  **/
  materialSave (param) {
    return http.put(http.adornUrl(`/admin/material/save`), param)
  },
/** 宣传素材/删除  **/
  materialDel (param) {
    return http.delete(http.adornUrl(`/admin/material/deleteById/${param}`))
  },
/** 宣传素材/发布或上架  **/
  materialCheck (param) {
    return http.put(http.adornUrl(`/admin/material/check`), param)
  },
/** 宣传素材/详情  **/
  materialInfo (param) {
    return http.get(http.adornUrl(`/admin/material/info/${param}`))
  },
/** 宣传素材/修改  **/
  materialUpdate (param) {
    return http.put(http.adornUrl(`/admin/material/update`), param)
  },
/** 通知公告/获取分页数据 **/
  noticePage (param) {
    return http.get(http.adornUrl(`/admin/notice/page`), { params: param })
  },
/** 通知公告/详情 **/
  noticeInfo (param) {
    return http.get(http.adornUrl(`/admin/notice/info/${param}`))
  },
/** 通知公告/新增 **/
  noticeSave (param) {
    return http.put(http.adornUrl(`/admin/notice/save`), param)
  },
/** 通知公告/新增 **/
  noticeUpdate (param) {
    return http.put(http.adornUrl(`/admin/notice/update`), param)
  },
/** 通知公告/删除 **/
  noticeDel (param) {
    return http.delete(http.adornUrl(`/admin/notice/deleteById/${param}`))
  },
/** 通知公告/发布或上架 **/
  noticeCheck (param) {
    return http.put(http.adornUrl(`/admin/notice/check`), param)
  }

}
